<template>
  <div class="App">
    <h1 class="content">我是App</h1>
    <p>当前用户访问量{{usersNum | splitNumsComma}}</p>
    <p>价格1:{{price1 | priceFormat(2) | add$}}</p>
    <p>价格2:{{price2 | priceFormat(3) | add$}}</p>
    <Cont />
   </div>
</template>

<script>
import Cont from '@/components/Cont';

export default {
  name: 'App',
  components: {
    Cont,
  },
  data(){
    return {
      count:0,
      usersNum:14567895464866,
      price1:12,
      price2:14.1,
      price3:18.98,
    };
  },
  filters:{
    splitNumsComma(value){
      const reg=/(\d)(?=(\d{3})+$)/g;
      return String(value).replace(reg,"$1,")
    }
  }
}
</script>


